//
//  MoviesDictionary.m
//  RGATest
//
//  Created by Pablo Javier Bertola on 2/8/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "MoviesDictionary.h"

@implementation MoviesDictionary
static MoviesDictionary * _instance;

-(NSDictionary *)getMovies
{
    return (NSDictionary *) _movies;
}

+(MoviesDictionary *)instance
{
    @synchronized(self)
    {
        if (_instance == NULL)
        {
            _instance = [[MoviesDictionary alloc]init];

        }
    }
    return _instance;
}
-(id)init
{
    self = [super init];
    
    if(self)
    {
        _movies = [[NSMutableDictionary alloc]init];
    }
    return self;
}
-(void)setMovie:(NSDictionary*)movie forKey:(NSString*)key
{
    [_movies setObject:movie forKey:key];
}
-(void)dealloc
{
    [super dealloc];
    [_movies release];
}
@end
